import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs/Observable';
import {WorkStatus} from '../momain/work-status';
import {Wdetail} from '../momain/wdetail';

const url = '/api/wStatus';

@Injectable()
export class WorkStatusService {

  constructor(private httpClient: HttpClient) {

  }

  getList(): Observable<WorkStatus[]> {
    return this.httpClient.get<WorkStatus[]>(`${url}/list`);
  }

  getDetail(ids: string): Observable<Wdetail> {
    return this.httpClient.get<Wdetail>('/api/wStatus/getDetail', {params: {id: ids}});
  }

}
